Direct2D API Reference

Direct2D Overview

Direct2D is a 2D graphics API that is part of the Windows SDK. It provides a low-level, hardware-accelerated drawing API for Windows applications.

Direct2D is commonly used for drawing shapes, text, and images on a screen. It is designed to be highly performant and efficient.

Direct2D Functions

Direct2D API Reference
Function Name Description Parameters Return Value
ID2D1DeviceContext Represents the 2D device context, which is the core object used to draw in Direct2D.
  • None
None
D2D1CreateDeviceContext(const D2D1_FACTORY* factory, D2D1_RENDER_TARGET_PROPERTIES properties) Creates a new 2D device context.
  • factory: A pointer to a factory object that is used to create the device context.
  • properties: Properties of the render target.
ID2D1DeviceContext*
D2D1CreateVectorGeometry(const D2D1_VECTOR_GEOMETRY_DESC& desc, ID2D1Factory1* factory) Creates a vector geometry.
  • desc: Description of the vector geometry.
  • factory: A pointer to a factory object.
ID2D1Geometry*

See Also